//=============================================================================
// SentinelSensors - Improves detection of enemies.
//=============================================================================
class SentinelSensors extends SentinelUpgrade;

function InitFor(Sentinel S)
{
	Super.InitFor(S);

	S.SightRadius *= 1.2;
	S.SensorAngle += (360 - S.SensorAngle) * 0.5;
	S.Controller.FovAngle = S.SensorAngle;
	S.PeripheralVision -= 0.5;
	S.PeripheralVision = FMax(S.PeripheralVision, -1.0);
	S.HearingAdjustment *= 0.5;
	S.HearingThreshold *= 1.2;
}

function RemoveUpgrade(optional bool bRemoveAll)
{
	if(Sentinel != None && Sentinel.Controller != None)
	{
		Sentinel.SightRadius = Sentinel.Default.SightRadius;
		Sentinel.SensorAngle = Sentinel.Default.SensorAngle;
		Sentinel.Controller.FovAngle = Sentinel.SensorAngle;
		Sentinel.PeripheralVision = Sentinel.Default.PeripheralVision;
		Sentinel.HearingAdjustment = Sentinel.Default.HearingAdjustment;
		Sentinel.HearingThreshold = Sentinel.Default.HearingThreshold;
	}

	Super.RemoveUpgrade(bRemoveAll);
}

defaultproperties
{
     AmmoCost=1
     UpgradeName="Sensors"
     Description="A set of high sensitivity audio and visual sensors. Allows more accurate target detection over a wider angle and greater range than the standard sensors."
     ActivateSound=Sound'TFMedia.SensorActivate'
}
